﻿
<CnGalWebSite.Shared.MasaComponent.Shared.Cards.Search.InfoCard Name="@Model.Name" BriefIntroduction="@Model.BriefIntroduction" OnClick="OnClick" Image="@Model.MainImage" Type="@(Model.IsDefault?"默认":"")" InfoItems="@GetInfoItems()" Class="mb-4"/>

@code {
    [Parameter]
    public FavoriteFolderOverviewModel Model { get; set; }
    [Parameter]
    public EventCallback<FavoriteFolderOverviewModel> OnClickLayout { get; set; }

    public async Task OnClick()
    {
        await OnClickLayout.InvokeAsync(Model);
    }
    public List<(IconType, string)> GetInfoItems()
    {
        var items = new List<(IconType, string)>
        {
            (IconType.DeterminedTime,Model.CreateTime.ToString("yyyy-MM-dd")),
            (IconType.Look,Model.Count.ToString()+"次阅读"),
        };
        return items;
    }
}
